import request from '@/utils/request'
import apis from './'

export function getMemberWechatList (parameter) {
  return request({
    url: apis.MemberWechat,
    method: 'get',
    params: parameter
  })
}

export function getRemarkWx (id) {
  return request({
    url: `${apis.ExtendWx}?wx_id=${id}`,
    method: 'get'
  })
}

export function getSignWx (id) {
  return request({
    url: `${apis.SignWx}?wx_id=${id}`,
    method: 'get'
  })
}

export function getWechat (parameter) {
  return request({
    url: apis.IndexWechat,
    method: 'get',
    params: parameter
  })
}

export function postRemarkWx (id, data) {
  return request({
    url: `${apis.ExtendWx}?wx_id=${id}`,
    method: 'post',
    data: data
  })
}

export function postSignWx (id, data) {
  return request({
    url: `${apis.SignWx}?wx_id=${id}`,
    method: 'post',
    data: data
  })
}

export function getExtend (id) {
  return request({
    url: `${apis.WxRemark}?wx_id=${id}`,
    method: 'get'
  })
}

export function signBad (id, lx, data) {
  return request({
    url: `${apis.WxRemark}?wx_id=${id}&wx_type=${lx}`,
    method: 'post',
    data: data
  })
}

export function setIsRead (id) {
  return request({
    url: `${apis.SetWx}?wx_id=${id}`,
    method: 'get'
  })
}

export function getStatusWechatList (parameter) {
  return request({
    url: apis.StatusWechat,
    method: 'get',
    params: parameter
  })
}

export function getState1 (parameter) {
  return request({
    url: apis.WechatState1,
    method: 'get',
    params: parameter
  })
}

export function getState2 (parameter) {
  return request({
    url: apis.WechatState2,
    method: 'get',
    params: parameter
  })
}

export function getCheckWechat (parameter) {
  return request({
    url: apis.GetCheckWechat,
    method: 'get',
    params: parameter
  })
}

export function getCheckStatus (id) {
  return request({
    url: `${apis.CheckWechatStatus}?eid=${id}`,
    method: 'get'
  })
}

export function postCheckStatus (id) {
  return request({
    url: `${apis.CheckWechatStatus}?eid=${id}`,
    method: 'post'
  })
}
